/*
 * Powered By [rapid-framework]
 * Web Site: http://www.rapid-framework.org.cn
 * Google Code: http://code.google.com/p/rapid-framework/
 * Since 2008 - 2012
 */

package com.tech15.pub.model;

import javax.persistence.*;

import org.hibernate.annotations.GenericGenerator;

import javax.validation.constraints.*;
import org.hibernate.validator.constraints.*;
import org.apache.commons.lang.builder.EqualsBuilder;
import org.apache.commons.lang.builder.HashCodeBuilder;
import org.apache.commons.lang.builder.ToStringBuilder;
import org.apache.commons.lang.builder.ToStringStyle;

import java.util.*;

import javacommon.base.*;
import javacommon.util.*;

import cn.org.rapid_framework.util.*;
import cn.org.rapid_framework.web.util.*;
import cn.org.rapid_framework.page.*;
import cn.org.rapid_framework.page.impl.*;

import com.tech15.pub.model.*;
import com.tech15.pub.dao.*;
import com.tech15.pub.service.*;
import com.tech15.pub.vo.query.*;

/**
 * @author 胡作正 email:zuozhenghu@sina.com
 * @version 1.0
 * @since 1.0
 */


@Entity
@Table(name = "PUB_COST")
public class PubCost extends BaseEntity implements java.io.Serializable{
	private static final long serialVersionUID = 5454155825314635342L;
	
	//alias
	public static final String TABLE_ALIAS = "个人费用";
	public static final String ALIAS_ID = "序号";
	public static final String ALIAS_ND = "年度";
	public static final String ALIAS_LB = "类别（1车 2固话 3手机）";
	public static final String ALIAS_YGBH = "员工编号";
	public static final String ALIAS_YGXM = "员工姓名";
	public static final String ALIAS_CJ = "层级";
	public static final String ALIAS_BZ = "标准";
	public static final String ALIAS_DW = "单位";
	public static final String ALIAS_YWC = "有无车";
	public static final String ALIAS_QNKBXED = "全年可报销额度";
	public static final String ALIAS_Y1 = "1月";
	public static final String ALIAS_Y2 = "2月";
	public static final String ALIAS_Y3 = "3月";
	public static final String ALIAS_Y4 = "4月";
	public static final String ALIAS_Y5 = "5月";
	public static final String ALIAS_Y6 = "6月";
	public static final String ALIAS_Y7 = "7月";
	public static final String ALIAS_Y8 = "8月";
	public static final String ALIAS_Y9 = "9月";
	public static final String ALIAS_Y10 = "10月";
	public static final String ALIAS_Y11 = "11月";
	public static final String ALIAS_Y12 = "12月";
	
	//date formats
	

	//可以直接使用: @Length(max=50,message="用户名长度不能大于50")显示错误消息
	//columns START
    /**
     * 序号       db_column: ID 
     */ 	
	@Length(max=32)
	private java.lang.String id;
    /**
     * 年度       db_column: ND 
     */ 	
	@Length(max=7)
	private java.lang.String nd;
    /**
     * 类别（1车 2固话 3手机）       db_column: LB 
     */ 	
	@Max(127)
	private Integer lb;
    /**
     * 员工编号       db_column: YGBH 
     */ 	
	@Length(max=30)
	private java.lang.String ygbh;
    /**
     * 员工姓名       db_column: YGXM 
     */ 	
	@Length(max=30)
	private java.lang.String ygxm;
    /**
     * 层级       db_column: CJ 
     */ 	
	@Length(max=30)
	private java.lang.String cj;
    /**
     * 标准       db_column: BZ 
     */ 	
	
	private Float bz;
    /**
     * 单位       db_column: DW 
     */ 	
	@Length(max=10)
	private java.lang.String dw;
    /**
     * 有无车       db_column: YWC 
     */ 	
	@Length(max=10)
	private java.lang.String ywc;
    /**
     * 全年可报销额度       db_column: QNKBXED 
     */ 	
	
	private Float qnkbxed;
    /**
     * 1月       db_column: Y1 
     */ 	
	
	private Float y1;
    /**
     * 2月       db_column: Y2 
     */ 	
	
	private Float y2;
    /**
     * 3月       db_column: Y3 
     */ 	
	
	private Float y3;
    /**
     * 4月       db_column: Y4 
     */ 	
	
	private Float y4;
    /**
     * 5月       db_column: Y5 
     */ 	
	
	private Float y5;
    /**
     * 6月       db_column: Y6 
     */ 	
	
	private Float y6;
    /**
     * 7月       db_column: Y7 
     */ 	
	
	private Float y7;
    /**
     * 8月       db_column: Y8 
     */ 	
	
	private Float y8;
    /**
     * 9月       db_column: Y9 
     */ 	
	
	private Float y9;
    /**
     * 10月       db_column: Y10 
     */ 	
	
	private Float y10;
    /**
     * 11月       db_column: Y11 
     */ 	
	
	private Float y11;
    /**
     * 12月       db_column: Y12 
     */ 	
	
	private Float y12;
	//columns END


	public PubCost(){
	}

	public PubCost(
		java.lang.String id
	){
		this.id = id;
	}

	

	public void setId(java.lang.String value) {
		this.id = value;
	}
	
	@Id @GeneratedValue(generator="custom-id")
	@GenericGenerator(name="custom-id", strategy = "uuid.hex")
	@Column(name = "ID", unique = true, nullable = false, insertable = true, updatable = true, length = 32)
	public java.lang.String getId() {
		return this.id;
	}
	
	@Column(name = "ND", unique = false, nullable = true, insertable = true, updatable = true, length = 7)
	public java.lang.String getNd() {
		return this.nd;
	}
	
	public void setNd(java.lang.String value) {
		this.nd = value;
	}
	
	@Column(name = "LB", unique = false, nullable = true, insertable = true, updatable = true, length = 2)
	public Integer getLb() {
		return this.lb;
	}
	
	public void setLb(Integer value) {
		this.lb = value;
	}
	
	@Column(name = "YGBH", unique = false, nullable = true, insertable = true, updatable = true, length = 30)
	public java.lang.String getYgbh() {
		return this.ygbh;
	}
	
	public void setYgbh(java.lang.String value) {
		this.ygbh = value;
	}
	
	@Column(name = "YGXM", unique = false, nullable = true, insertable = true, updatable = true, length = 30)
	public java.lang.String getYgxm() {
		return this.ygxm;
	}
	
	public void setYgxm(java.lang.String value) {
		this.ygxm = value;
	}
	
	@Column(name = "CJ", unique = false, nullable = true, insertable = true, updatable = true, length = 30)
	public java.lang.String getCj() {
		return this.cj;
	}
	
	public void setCj(java.lang.String value) {
		this.cj = value;
	}
	
	@Column(name = "BZ", unique = false, nullable = true, insertable = true, updatable = true, length = 22)
	public Float getBz() {
		return this.bz;
	}
	
	public void setBz(Float value) {
		this.bz = value;
	}
	
	@Column(name = "DW", unique = false, nullable = true, insertable = true, updatable = true, length = 10)
	public java.lang.String getDw() {
		return this.dw;
	}
	
	public void setDw(java.lang.String value) {
		this.dw = value;
	}
	
	@Column(name = "YWC", unique = false, nullable = true, insertable = true, updatable = true, length = 10)
	public java.lang.String getYwc() {
		return this.ywc;
	}
	
	public void setYwc(java.lang.String value) {
		this.ywc = value;
	}
	
	@Column(name = "QNKBXED", unique = false, nullable = true, insertable = true, updatable = true, length = 22)
	public Float getQnkbxed() {
		return this.qnkbxed;
	}
	
	public void setQnkbxed(Float value) {
		this.qnkbxed = value;
	}
	
	@Column(name = "Y1", unique = false, nullable = true, insertable = true, updatable = true, length = 22)
	public Float getY1() {
		return this.y1;
	}
	
	public void setY1(Float value) {
		this.y1 = value;
	}
	
	@Column(name = "Y2", unique = false, nullable = true, insertable = true, updatable = true, length = 22)
	public Float getY2() {
		return this.y2;
	}
	
	public void setY2(Float value) {
		this.y2 = value;
	}
	
	@Column(name = "Y3", unique = false, nullable = true, insertable = true, updatable = true, length = 22)
	public Float getY3() {
		return this.y3;
	}
	
	public void setY3(Float value) {
		this.y3 = value;
	}
	
	@Column(name = "Y4", unique = false, nullable = true, insertable = true, updatable = true, length = 22)
	public Float getY4() {
		return this.y4;
	}
	
	public void setY4(Float value) {
		this.y4 = value;
	}
	
	@Column(name = "Y5", unique = false, nullable = true, insertable = true, updatable = true, length = 22)
	public Float getY5() {
		return this.y5;
	}
	
	public void setY5(Float value) {
		this.y5 = value;
	}
	
	@Column(name = "Y6", unique = false, nullable = true, insertable = true, updatable = true, length = 22)
	public Float getY6() {
		return this.y6;
	}
	
	public void setY6(Float value) {
		this.y6 = value;
	}
	
	@Column(name = "Y7", unique = false, nullable = true, insertable = true, updatable = true, length = 22)
	public Float getY7() {
		return this.y7;
	}
	
	public void setY7(Float value) {
		this.y7 = value;
	}
	
	@Column(name = "Y8", unique = false, nullable = true, insertable = true, updatable = true, length = 22)
	public Float getY8() {
		return this.y8;
	}
	
	public void setY8(Float value) {
		this.y8 = value;
	}
	
	@Column(name = "Y9", unique = false, nullable = true, insertable = true, updatable = true, length = 22)
	public Float getY9() {
		return this.y9;
	}
	
	public void setY9(Float value) {
		this.y9 = value;
	}
	
	@Column(name = "Y10", unique = false, nullable = true, insertable = true, updatable = true, length = 22)
	public Float getY10() {
		return this.y10;
	}
	
	public void setY10(Float value) {
		this.y10 = value;
	}
	
	@Column(name = "Y11", unique = false, nullable = true, insertable = true, updatable = true, length = 22)
	public Float getY11() {
		return this.y11;
	}
	
	public void setY11(Float value) {
		this.y11 = value;
	}
	
	@Column(name = "Y12", unique = false, nullable = true, insertable = true, updatable = true, length = 22)
	public Float getY12() {
		return this.y12;
	}
	
	public void setY12(Float value) {
		this.y12 = value;
	}
	
	

	public String toString() {
		return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE)
			.append("Id",getId())
			.append("Nd",getNd())
			.append("Lb",getLb())
			.append("Ygbh",getYgbh())
			.append("Ygxm",getYgxm())
			.append("Cj",getCj())
			.append("Bz",getBz())
			.append("Dw",getDw())
			.append("Ywc",getYwc())
			.append("Qnkbxed",getQnkbxed())
			.append("Y1",getY1())
			.append("Y2",getY2())
			.append("Y3",getY3())
			.append("Y4",getY4())
			.append("Y5",getY5())
			.append("Y6",getY6())
			.append("Y7",getY7())
			.append("Y8",getY8())
			.append("Y9",getY9())
			.append("Y10",getY10())
			.append("Y11",getY11())
			.append("Y12",getY12())
			.toString();
	}
	
	public int hashCode() {
		return new HashCodeBuilder()
			.append(getId())
			.toHashCode();
	}
	
	public boolean equals(Object obj) {
		if(obj instanceof PubCost == false) return false;
		if(this == obj) return true;
		PubCost other = (PubCost)obj;
		return new EqualsBuilder()
			.append(getId(),other.getId())
			.isEquals();
	}
	
	private Float hj;
	private Float qnsyed;

	@Transient
	public Float getHj() {
		return hj;
	}

	public void setHj(Float hj) {
		this.hj = hj;
	}

	@Transient
	public Float getQnsyed() {
		return qnsyed;
	}

	public void setQnsyed(Float qnsyed) {
		this.qnsyed = qnsyed;
	}
	
}

